home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 8
/
The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO
/
g_quake
/
server1.zip
/
_LEVSEL.QC
< prev
next >
Wrap
Text File
|
1996-09-07
|
5KB
|
120 lines
/*
**
** _levsel.qc (LevelSelect Code, 1.0)
**
** Copyright (C) 1996 Johannes Plass
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
**
*/
void(entity player) LevelSelectInit =
{
if (!USE_MODULE_LEVELSELECT) return;
// nothing to do
};
void(entity player) LevelSelectInfo =
{
if (!USE_MODULE_LEVELSELECT) return;
// nothing to do
};
void() LevelSelectSelectLevel =
{
if (!USE_MODULE_LEVELSELECT) return;
// 'mapname' is the name of the level which just ended
// 'nextmap' is the name of the map quake proposes to be the next one
// DEATHMATCH LEVELS, END LEVEL
if ( nextmap == "end" ) nextmap = "dm1" ;
else if (mapname == "dm6" ) nextmap = "end" ;
else if (mapname == "end" ) nextmap = "start" ;
/*
// EPISODE 1
else if ( nextmap == "e1m1" ) nextmap = "e1m2" ;
else if (mapname == "e1m3" ) nextmap = "e1m5" ;
else if (mapname == "e1m7" ) nextmap = "e1m8" ;
else if (mapname == "e1m8" ) nextmap = "start" ;
// EPISODE 2
else if ( nextmap == "e2m1" ) nextmap = "e2m7" ;
else if (mapname == "e2m7" ) nextmap = "e2m1" ;
else if (mapname == "e2m1" ) nextmap = "e2m2" ;
else if (mapname == "e2m2" ) nextmap = "e2m3" ;
else if (mapname == "e2m3" ) nextmap = "e2m4" ;
else if (mapname == "e2m4" ) nextmap = "e2m5" ;
else if (mapname == "e2m5" ) nextmap = "start" ;
// EPISODE 3
else if (mapname == "e3m1" ) nextmap = "e3m5" ;
else if (mapname == "e3m5" ) nextmap = "e3m6" ;
else if (mapname == "e3m6" ) nextmap = "e3m7" ;
else if (mapname == "e3m7" ) nextmap = "start" ;
// EPISODE 4
else if (mapname == "e4m1" ) nextmap = "e4m8" ;
else if (mapname == "e4m8" ) nextmap = "e4m2" ;
else if (mapname == "e4m2" ) nextmap = "e4m3" ;
else if (mapname == "e4m3" ) nextmap = "e4m4" ;
else if (mapname == "e4m4" ) nextmap = "e4m6" ;
else if (mapname == "e4m6" ) nextmap = "e4m7" ;
else if (mapname == "e4m7" ) nextmap = "start" ;
*/
return;
};
/*
========================================================================
EXAMPLE
========================================================================
if ( nextmap == "end" ) nextmap = "dm1" ;
else if (mapname == "dm6" ) nextmap = "end" ;
else if (mapname == "end" ) nextmap = "start" ;
else if ( nextmap == "e1m1" ) nextmap = "e1m2" ;
else if (mapname == "e1m3" ) nextmap = "e1m5" ;
else if (mapname == "e1m7" ) nextmap = "e1m8" ;
else if (mapname == "e1m8" ) nextmap = "start" ;
What does the example above ?
Line 1: When Quake wants to play the level "end", we will go to level
"dm1" instead.
Line 2: When map "dm6" has ended, Quake usually wants to go to level
"dm1". But no, we prefer to branch to level "end".
Line 3: Quake proposes level "e1m1". No, it's ugly, we skip that one
and go to "e1m2" immediately.
Line 4: The map "e1m3" just ended. This level has two exits, branching
to "e1m8" and "e1m4".
No, we don't like "e1m4" in deathmatch and "e1m8" will be played
later, so we go to "e1m5" now.
Line 5: Level "e1m7" just ended and Quake wants to go back to the "start"
now. We override this and play the secret level "e1m8".
Line 6: After playing the secret level "e1m8", Quake wants us to play
"e1m5". However, we already visited this one earlier, so let's
go the the "start" level.
===========================================================================
*/